# Maintainer: Oliver Smith <ollieparanoid@postmarketos.org>
# Contributor: Oliver Smith <ollieparanoid@postmarketos.org>
pkgname=autologin
pkgver=1.0.0
pkgrel=6
pkgdesc="Daemon for automatic login on TTY"
url="https://git.sr.ht/~kennylevinsen/autologin"
arch="all"
license="GPL-3.0-only"
makedepends="meson linux-pam-dev linux-headers"
options="!check" # No tests
source="autologin-$pkgver.tar.gz::https://git.sr.ht/~kennylevinsen/autologin/archive/$pkgver.tar.gz
	autologin.pamd
	"

build() {
	abuild-meson . output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install -C output
	install -Dm644 "$srcdir"/autologin.pamd "$pkgdir"/etc/pam.d/autologin
}

sha512sums="
b2714c1f9385228d8f4a8e68a4abdfcbab0877a4334be609bb70e0aabb280d6d9885ab8d0881eb24085693a0048e51c5b9a98e5118835a74edb3ebbf745561b4  autologin-1.0.0.tar.gz
2dd335efa013a3725958fac505acd1067ab331340cd95c154f278afbb1e976504fcb9940016c01120b19acac97bfa1fd425a922d0e83eed7d5ebd691b8b55af0  autologin.pamd
"
